{# src/Acme/HolaBundle/Resources/views/Hola/index.html.twig #}
{% extends "PyafGymBundle::layout_admin.html.twig" %}

{% block title %} Pyaf {% endblock %}

{% block content %}
<div class="container-fluid" id="content-area" style="padding-right: 30px;">    
        
        {% if app.session.hasFlash('alertaInicioSuccess') %}
            <div class="alert alert-success">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                {{ app.session.flash('alertaInicioSuccess') }}
            </div>
        {% endif %}
        {% if app.session.hasFlash('alertaInicioError') %}
            <div class="alert alert-error">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                {{ app.session.flash('alertaInicioError') }}
            </div>
        {% endif %}
        
    <div class="row-fluid">
        <div class="span12">
            <div class="box">
                <div class="box-head"><i class="icon-table"></i><span>Tablero de Rutinas</span></div>
                <div class="box-body">
                    <div class="span12">
                        <div class="mini-layout">
                            <div class="mini-layout-header">
                                <i class="icon-leaf"></i>
                                <span>Rutina del día</span>
                            </div>
                            <div class="mini-layout-body">
                                <div class="container-fluid">
                                    <div class="row-fluid">
                                        <div class="span12">
                                            <div class="box">
                                                <address>
                                                    <strong>Nombre: </strong> {{rutina.nombre}} <br>
                                                    <abbr title="Descripción">Descripción: </abbr> {{rutina.descripcion}}<br>
                                                </address>
                                                <strong>Grupos musculares asociados: </strong>
                                            </div>
                                         </div>            
                                     </div>
                                 </div>
                                <table class="table table-striped table-invoice">
                                    <thead>
                                        <tr>
                                            <th>Nombre</th>
                                            <th>Descripción</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for item in rutina.gruposmusculares %}
                                        <tr>
                                            <td class='name'><i class="icon-caret-right"/> {{item.nombre}}</td>
                                            <td class='price'>{{item.descripcion}}</td>
                                        </tr>
                                        {% endfor %}
                                    </tbody>
                                </table>    
                            </div>
                        </div>
                    </div>          
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
{% block javascripts %}
    <script type="text/javascript">
        $(document).ready(function() { 
            $.blockUI({ 
                message: 'Cargando<img src="{{ asset('bootstrap/img/loading.gif') }}" />',
                css: {   border: '0px'},
                timeout: 2000
            });

        });
        $(window).load();
    </script>
{% endblock %}